﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using SMS.Entities;
using SMS.DAL;

namespace SMS.Web.Service
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "MenuService" in code, svc and config file together.
    public class MenuService : IMenuService
    {
        public void DoWork()
        {
        }
        public List<SMS.Entities.Menu.Menu> SelectMenu(string userName, string searchText, out SMSException serviceError)
        {
            try
            {
                var retObj = new MenuDA().SearchObject(userName, searchText); 
                serviceError = null;
                return retObj;
            }
            catch (Exception ex)
            {
                serviceError = new Entities.SMSException(ex);
                return null;
            }
        }
    }
}
